package com.lwj.liwanjia.view.activity.myindent;

import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.lwj.liwanjia.R;
import com.lwj.liwanjia.base.BaseActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class DjUnorderDetailActivity extends BaseActivity {

    @BindView(R.id.status_bar)
    RelativeLayout statusBar;
    @BindView(R.id.iv_left)
    ImageView ivLeft;
    @BindView(R.id.tv_left)
    TextView tvLeft;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.iv_right)
    ImageView ivRight;
    @BindView(R.id.tv_right)
    TextView tvRight;
    @BindView(R.id.head_layout)
    RelativeLayout headLayout;
    @BindView(R.id.iv_pay_state)
    ImageView ivPayState;
    @BindView(R.id.tv_pay_state)
    TextView tvPayState;
    @BindView(R.id.pay_state)
    LinearLayout payState;
    @BindView(R.id.tv_price)
    TextView tvPrice;
    @BindView(R.id.ll_price)
    LinearLayout llPrice;
    @BindView(R.id.detail_head)
    RelativeLayout detailHead;
    @BindView(R.id.tv_name)
    TextView tvName;
    @BindView(R.id.tv_detail_name)
    TextView tvDetailName;
    @BindView(R.id.rl_name)
    RelativeLayout rlName;
    @BindView(R.id.tv_phone)
    TextView tvPhone;
    @BindView(R.id.tv_detail_phone)
    TextView tvDetailPhone;
    @BindView(R.id.rl_phone)
    RelativeLayout rlPhone;
    @BindView(R.id.tv_type)
    TextView tvType;
    @BindView(R.id.tv_detail_type)
    TextView tvDetailType;
    @BindView(R.id.rl_type)
    RelativeLayout rlType;
    @BindView(R.id.tv_bianhao)
    TextView tvBianhao;
    @BindView(R.id.tv_detail_bianhao)
    TextView tvDetailBianhao;
    @BindView(R.id.rl_bianhao)
    RelativeLayout rlBianhao;
    @BindView(R.id.tv_xiandan_time)
    TextView tvXiandanTime;
    @BindView(R.id.tv_detail_xdtime)
    TextView tvDetailXdtime;
    @BindView(R.id.rl_xiadan_time)
    RelativeLayout rlXiadanTime;
    @BindView(R.id.tv_yuyue_time)
    TextView tvYuyueTime;
    @BindView(R.id.tv_detail_yuyuetime)
    TextView tvDetailYuyuetime;
    @BindView(R.id.rl_yuyue_time)
    RelativeLayout rlYuyueTime;
    @BindView(R.id.tv_weizhi)
    TextView tvWeizhi;
    @BindView(R.id.tv_detail_weizhi)
    TextView tvDetailWeizhi;
    @BindView(R.id.rl_weizhi)
    RelativeLayout rlWeizhi;
    @BindView(R.id.tv_mudedi)
    TextView tvMudedi;
    @BindView(R.id.tv_detail_mudedi)
    TextView tvDetailMudedi;
    @BindView(R.id.rl_mudedi)
    RelativeLayout rlMudedi;
    @BindView(R.id.tv_liuyan)
    TextView tvLiuyan;
    @BindView(R.id.tv_detal_liuyan)
    TextView tvDetalLiuyan;
    @BindView(R.id.rl_liuyan)
    RelativeLayout rlLiuyan;
    @BindView(R.id.tv_quxiao_indent)
    TextView tvQuxiaoIndent;
    @BindView(R.id.tv_minute)
    TextView tvMinute;
    @BindView(R.id.tv_second)
    TextView tvSecond;
    @BindView(R.id.ll_topay)
    LinearLayout llTopay;
    @BindView(R.id.tv_call)
    TextView tvCall;
    @BindView(R.id.ll_bottom)
    LinearLayout llBottom;
    private String type1;
    private String type;

    @Override
    protected void initView() {
        type1 = getIntent().getStringExtra("type1");
        type = getIntent().getStringExtra("type");
        if (type1.equals("6")) {
            rlYuyueTime.setVisibility(View.VISIBLE);
        } else {
            rlYuyueTime.setVisibility(View.GONE);
        }
        tvLeft.setVisibility(View.VISIBLE);
        tvTitle.setText("订单详情");
        llTopay.setVisibility(View.GONE);
        tvCall.setVisibility(View.VISIBLE);
        ivPayState.setImageResource(R.mipmap.daifahuo);
        if (type.equals("待接单")) {
            tvPayState.setText("待接单");
            tvPrice.setText("等待司机接单...");
            tvCall.setText("联系司机");
        } else if (type.equals("已接单")) {
            tvPayState.setText("已接单");
            tvPrice.setText("司机已接单...");
            tvCall.setText("确认到达");
        }
    }

    @Override
    protected void initData() {

    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_dj_unorder_detail;
    }

    @OnClick(R.id.tv_left)
    public void onViewClicked() {
        finish();
    }
}
